#include "threadArray.h"

int threadArrayInit(threadArray_t *pthreadArr, int workerNum){
    pthreadArr->workerNum = workerNum;
    pthreadArr->pthread_arr = (pthread_t *)malloc(workerNum * sizeof(pthread_t));//分配的单位是线程的大小
    //不是结构体的大小
    if (pthreadArr->pthread_arr == NULL) {
        return -1; // 内存分配失败
    }
    return 0; // 成功
}